package tabdulin.sms;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;

/**
 * @author Talgat Abdulin
 *
 */
public interface Operator {
	public static String FROM = "От ";

	public void startSession() throws MalformedURLException, IOException;
	
	public String getCaptchaFileName();
	
	public void closeSession();
	
	/**
	 * Validates sms attributes: phone number, message length, if captcha field was filled, etc...
	 * 
	 * @throws InvalidSmsException
	 */
	public void validate(Sms sms) throws InvalidSmsException;

	/**
	 * Sends sms.
	 * 
	 * @param sms
	 * @return HTML response from server.
	 * 
	 * @throws IOException 
	 */
	public InputStream send(Sms sms) throws IOException;

	/**
	 * @return
	 */
	public int checkStatus();
	
	public int getMaxMessageLength(boolean translit);
}
